import { alovaInstance } from './apiClient'
import type { UserInfo } from '../types/user'

// 用户注册
export const register = (data: { username: string; email: string; password: string }) => {
  return alovaInstance.Post('/register', data)
}

// 用户登录
export const login = (data: { username: string; password: string }) => {
  return alovaInstance.Post('/login', data)
}

// 获取用户信息
export const getUserInfo = () => {
  return alovaInstance.Get('/user/info')
}